﻿using System;
using System.Windows.Media;

namespace Silvery.Role.Simple
{
    /// <summary>
    /// 简要的NPC示例
    /// 因为NPC一般来说只有一个动作，因此只需要一个default动画
    /// </summary>
    public class SimpleRole_NPC : SimpleRole
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="bodyUri"></param>
        public SimpleRole_NPC(Uri bodyUri)
            : base(bodyUri)
        {
            base.BeginDownload();
            base.RoleNamePanel.RoleName.Foreground = new SolidColorBrush(Color.FromArgb(255, 12, 200, 12));
        }
        /// <summary>
        /// 当身体数据载入完成
        /// </summary>
        protected override void OnBodyPackLoaded()
        {
            BodyPart.AnimatMode = EmAnimatMode.Loop;
            CurrentAnimatName = BodyPart.SpiritData.AnimatNamesList[0];
            base.OnBodyPackLoaded();
        }
    }
}
